package org.xiaobai.ai.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.xiaobai.ai.entity.ChatCategoryVO;
import org.xiaobai.ai.entity.ChatRoomShareVO;
import org.xiaobai.ai.request.RoomShareAddRequest;
import org.xiaobai.ai.request.query.ChatCategoryPageQuery;

import java.util.List;

/**
 * 分享房间
 */
public interface ChatRoomShareService extends IService<ChatRoomShareVO> {
    /**
     * 新增分享链接
     * @return 分享链接
     */
    String addShare(RoomShareAddRequest addRequest);

    /**
     * 接收邀请
     * @param code
     * @return 房间id
     */
    Long invite(String code);

    /**
     * 获取被邀请人信息
     * @param from
     * @return
     */
    List<ChatRoomShareVO> findUserByFromUser(Long from);

    /**
     * 获取被邀请人信息
     * @param to
     * @return
     */
    List<ChatRoomShareVO> findUserByToUser(Long to);

    /**
     * 移除掉共享信息
     * @param userId
     * @return
     */
    Boolean removeByUserId(Long userId);

    /**
     * 移除掉共享信息
     * @param userId
     * @return
     */
    Boolean removeByUserIdAndRoomId(Long userId, Long roomId);
}
